package com.gzj.environment.module.collectData.repository;

import com.gzj.environment.model.collectData.dto.AirCollectData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class AirCollectDataRepository {

    @Autowired
    private MongoTemplate mongoTemplate;

    public void saveAirCollectData(AirCollectData data) {
        mongoTemplate.insert(data);
    }

    public List<AirCollectData> findAll() {
        return mongoTemplate.findAll(AirCollectData.class);
    }
}
